package com.gxa.community.admin.controller.classification;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.gxa.community.admin.service.classification.ClassificationService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/classification")
public class ClassificationController {
    @Autowired
    private ClassificationService classificationService;

    @ApiOperation("查询所有分类及分类中包含的商品信息")
    @GetMapping("/queryallclassificationandAllgoodsinfo")
    public String queryAllClassificationAndAllGoodsInfo() throws JsonProcessingException {
        String r = classificationService.queryAllClassificationAndAllGoodsInfo();
        return r;
    }
}
